﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SportStore.Domain.Abstract;
using SportStore.Domain.Entities;
using System.Data.Linq;

namespace SportStore.Domain.Concrete
{
    public class SqlProductsRepository: IProductsRepository
    {
        private Table<Product> productsTable;

        public SqlProductsRepository(string connectionString)
        {
            productsTable = (new DataContext(connectionString)).GetTable<Product>();
        }

        public IQueryable<Entities.Product> Products
        {
            get { return productsTable; }
        }
    }
}
